Skip to content

reimplement: SHC_3BB0A8C1_0x00479B70 100%#74

Draft
TheRedDaemon wants to merge 4 commits into
mainfrom
reimpl/SHC_3BB0A8C1_0x00479B70
Draft

reimplement: SHC_3BB0A8C1_0x00479B70 100%#74
TheRedDaemon wants to merge 4 commits into
mainfrom
reimpl/SHC_3BB0A8C1_0x00479B70

Conversation

@TheRedDaemon
Copy link
Copy Markdown
Contributor

I tested the bitfield theory once again and was able to achive the 100% with it, while still having somewhat readable code.
I am now rather certain that they used a bitfield for this. Managing this by bit-operators would appear to be too much of a hassle to be worthwhile, in my eyes.

@TheRedDaemon TheRedDaemon requested a review from gynt May 15, 2026 19:56
@gynt
Copy link
Copy Markdown
Contributor

gynt commented May 22, 2026

Great find! Ghidra has improved bitfield support and I think you tested this too. Can you confirm Ghidra's decompilations work out all right, or does the code get uglier?

Internally I will have to provide an exception to overwriting your customised .hpp file.

@TheRedDaemon
Copy link
Copy Markdown
Contributor Author

When I tried creating one, everything that was not straight forward became uglier, sadly. No idea if I did it properly, though.
One check and one direct assign was less ugly, but stuff like setting one value to 0, which is implemented by value & 0x7fffffff for example, all used Ghidra support functions.

@gynt
Copy link
Copy Markdown
Contributor

gynt commented May 22, 2026

Wht is your opinion on a split situation in which we don't update Ghidra upstream but do use the bitfield in this repo? In essence, it means ghidra exports will never override the bitfield .hpp file ever again. The annoying thing is to remember that this exception exists so when looking at Ghidra code you should translate it into (the much easier) bitfield access logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants